package com.bee.plus.util;

import cn.hutool.core.lang.generator.SnowflakeGenerator;

/**
 * @author xupei
 */
public class SnowIdUtil {

    private static SnowflakeGenerator snowflakeGenerator=new SnowflakeGenerator();

    private SnowIdUtil() {

    }


    public static Long getNextId(){
        return snowflakeGenerator.next();
    }

    public static void main(String[] args) {
        for(int i=0;i<100;i++){
            Long id= SnowIdUtil.getNextId();
            System.out.println(id);
        }

    }
}
